<?php

class Links_process extends CI_Model {//这里关于admin表的一些操作和登录判定

    const Statustrue = True;
    const Statusflase = False;

    function __construct() {
        parent::__construct();
    }

    function add_link($post_array) {
    
     
      $sql = "insert into links(title,img,url,`order`)values(
      \"{$_POST["title"]}\",\"{$_POST["img"]}\",\"{$_POST["url"]}\",\"{$_POST["order"]}\" ) ";
      
             $this->db->query($sql);
      
    }

    function links_list() {
        $sql = "select * from links";
        $query = $this->db->query($sql);
        return $res = $query->result_array();
    }

}

?>
